package com.zut.common.enums;

import lombok.Getter;

@Getter
public enum IsDeletedFlagEnum {
    DELETED(1,"已经被删除"),
    UN_DELETED(0,"未被删除");

    private Integer code;
    private String desc;

    IsDeletedFlagEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static IsDeletedFlagEnum getByCode(int codeVal) {
        for (IsDeletedFlagEnum result :IsDeletedFlagEnum.values()) {
            if (result.code==codeVal){
                return result;
            }
        }
        return null;
    }
}
